package com.distributeredis.redis_springboot.springeasyexcel.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {
    // index，字段排列顺序
    @ExcelProperty(value = "用户编号",index = 0)
    private Integer userId;
    @ExcelProperty(value = "姓名",index = 1)
    private String userName;
    @ExcelProperty(value = "性别",index = 3)
    private String gender;
    @ExcelProperty(value = "工资",index = 2)
    @NumberFormat("#.##")
    private Double salary;
    @ExcelProperty(value = "入职时间",index = 4)
    @DateTimeFormat("yyyy年MM月dd日")
    private Date hireDate;
}
